package com.woniuxy.yogaapp.configuration;

import org.springframework.cache.ehcache.EhCacheManagerFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class EhcacheConfig {
	@Bean
	public EhCacheManagerFactoryBean ehCacheManagerFactoryBean() {
	EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean();
	//设置共享缓存，让认证、授权共享一块区域
	cacheManagerFactoryBean.setShared(true);
	return cacheManagerFactoryBean;
	}
}
